package cn.exrick.xboot.supervisionDepartment.controllerImpl

import cn.exrick.xboot.base.entity.AccidentCase
import cn.exrick.xboot.base.service.IAccidentCaseService
import cn.exrick.xboot.base.vo.AccidentCaseVo
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import cn.exrick.xboot.supervisionDepartment.controller.ISupervisionDepartmentController
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RestController

@RestController
open class AccidentCaseController : ISupervisionDepartmentController.IAccidentCase {


    @Autowired
    private lateinit var iAccidentCaseService: IAccidentCaseService


    override fun createOrUpdateAccidentCase(accidentCase: AccidentCase): Result<Any?>? {

        return iAccidentCaseService.createOrUpdateAccidentCase(accidentCase)
    }

    override fun getAccidentCaseDetail(id: String?): Result<AccidentCaseVo?>? {

        return iAccidentCaseService.getAccidentCaseDetail(id)
    }

    override fun removeAccidentCase(ids: Array<out String>): Result<Any?>? {

        return iAccidentCaseService.removeAccidentCase(ids)
    }

    override fun getAccidentCaseList(pageVo: PageVo, type: Int): Result<MutableMap<String, Any?>>? {

        return iAccidentCaseService.getAccidentCaseList(pageVo, type)
    }
}